package org.example.batch.controller;

import org.example.batch.model.BatchMainTaskDto;
import org.example.batch.service.BatchMainTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 主任务web接口
 *
 * @author hero生仔
 * @date 2025/7/26
 */
@RestController
@RequestMapping("/batchmaintask")
public class BatchMainTaskController {
    @Autowired
    private BatchMainTaskService batchMainTaskService;

    @PostMapping("/putDatas")
    public void batchSubTask(@Valid @RequestBody BatchMainTaskDto batchMainTaskDto) {
        batchMainTaskService.handleMainTask(batchMainTaskDto);
    }
}
